package com.pluginsacceptor.plugin.formula.statistics;

import com.pluginsacceptor.plugin.formula.MathsTrigo.AbstractListener;
import com.pluginsacceptor.plugin.formula.MathsTrigo.support.DataListener;
import com.pluginsacceptor.plugin.formula.MathsTrigo.support.DataSender;
import com.pluginsacceptor.plugin.formula.MathsTrigo.support.MathData;

public class MoyenneHarmoListenerCalcul extends AbstractListener{

	 /**
     * Constructor
     * @param dataListener
     * @param dataSender
     */
    public MoyenneHarmoListenerCalcul(final DataListener dataListener, final DataSender dataSender) {
        super(dataListener, dataSender);
    }

   
	@Override
	protected double calculate() {
		Statistics s = new Statistics(); 
    	double result = s.moyenneHarmo(MathData.silentParse(this.getUserData()));
		return  result;
	}
}
